# -!- coding: utf-8 -!-
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
 存放api接口信息。以dict形式存放，这样就可以API_ALL[''][url]这种方式去取，看起来较直观，知道取得是哪个接口的那部分信息 
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
from datetime import datetime

API_Month={
    "jinjian":{"caseId":"",
		"uid":"zeng",
		"name":"李峰",
		"idCard":"520202199411204013",
		"phone":"15519878716",
		"sex":"1",
		"age":"40",
		"entrySource":"银河钱包",
		"applyProduct":"钱包app",   #   极速借贷2
		"applyLimit":"600000",
		"applyRate":0.0168,   # 总利率0.024  总利率<0.0168*申请期数
		"applyTerm":3,    #天数或者月数
		"termUnit":"2",    # 借款期数单位  1-日、2-月、3-年
		"bankCard":"6217007170007180605",
		"refuseReason":"",
		"occupation":"1",
		"monthIncome":"4500",
		"empName":"5551",
		"empCity":"5551",
		"empAddress":"5551",
		"empPhone":"5551",
		"qq":"5551",
		"weChat":"5551",
		"education":"5551",
		"maritalStatus":"5551",
		"email":"5551",
		"carStatus":"5551",
		"abodeAddress":"贵州省六盘水市盘县红果杜鹃西路金鼎嘉园二单元702",
		"idAddress":"贵州省盘县柏果镇深沟村二组",
		"gpsAddress":"中国贵州省六盘水市盘县杜鹃西路",
		"mobileBelong":"5551",
		"ip":"58.16.228.86",
		"equipModel":"5551",
		"equipBrand":"5551",
		"appName":"com.msxiaodai.galaxywallet",
		"appVersion":"2.1.2",
		"approResult":"通过",
		"idcardFront":"http://static.yhqb.agrant.cn/ff7c31f6d65bf8dee9d47bdca23e8f26.jpg",
		"idcardBack":"http://static.yhqb.agrant.cn/735eebab3e99e588b53013f670ef55f2.jpg",
		"imageOne":"http://static.yhqb.agrant.cn/878bc95f86fc66156c9fd9c73da610f6.jpg",
		"imageTwo":"http://static.yhqb.agrant.cn/0d060113571ea975822e4b549b401420.jpg",
		"imageThree":"http://static.yhqb.agrant.cn/98461afdab94f7e2b2d31de19dd8b2da.jpg",
		"imageFour":"http://static.yhqb.agrant.cn/32c7544ff6915ebbc3f15fac83fc7822.jpg",
		"imageFive":"http://static.yhqb.agrant.cn/cf46160626f9fa5f1bc90356aff8bdb3.jpg",
		"bodyScore":"81.30200000",
		"checkTime":"2019-2-2 12:12:12",
		"signTime":"2019-2-2 12:12:12",
		"rejectTime":"2019-2-2 12:12:12",
		"caseTime":"2019-1-4 12:12:12",
		"firstReject":"5551",
		"secondReject":"5551",
		"exceptionCode":"5551",
		"exceptionReason":"5551",
		"reportUrl":"5551",
		"reportJson":"5551",
		"maxQuota":100000,   # 审核资金区间500=<x<6000   额度≥1000且额度<50001
		"loanType":"ACAI", # (MCEI:等额本息;BQD:利随本清(60天产品计息方式);ACAI:等本等息（快捷分期产品）;OTROPAI:一次性还本付息;)
		"contactList":[
			{
				"name":"name1",
				"phone":"13717607750",
				"relation":"1",
				"remark":"remark"
			}
			]
	},
	"payout":{
		"cmd":"TransferSingle",
		"product":"",
		"batchNo":"15480283560",
		"bankCode":"CMBCHINA",
		"bankName":"",
		"orderId":"102286384541008",
		"amount":60000,                               # 金额600算60000
		"accountName":"北京维科特睿科技有限公司",
		"accountNumber":"110916301710802",
		"accountType":"pu",
		"notifyUrl":"http://www.calibre-ebook.com/download_windows64",
		"payChannel":1,
		"capitalId":2,
		"loanId":"",
		"userName":"李峰",
		"idCard":"520202199411204013"
		},
	"contract": {
		"use_for": "6",
		"ct_no": "102286384541008",
		"channel": "银河钱包",
		"id_card": "520202199411204013",
		"loan_amount": 50000,
		"bank_no": "6216610100012752214",
		"product_name": "快捷分期",                   # 钱包app
		"sign_time": datetime.now().strftime('%Y-%m-%d %H:%M:%S'),
		"uid": "zeng",
		"single_rate": 0.0168,      # 60天产品：0.0004
		"interest_mode": "ACAI",
		"phone": "15519878716",
		"name": "李峰",
		"bank_name": "中国银行",
		"loan_term": "61",
		"term_type": "2",   # 借款期数单位  1-日、2-月、3-年
		"loan_id": "",
		"status": "4",
		"loan_time": datetime.now().strftime('%Y-%m-%d %H:%M:%S')
		},
	"repaymentPlan":{
		"id_card":"",
		"term_type":2,   # 借款期数单位  1-日、2-月、3-年
		"loanRecord": {
			"contract_id": "W19012515304013",
			"ct_no": "102286384541008",
			"channel": "1",
			"received_time": datetime.now().strftime('%Y-%m-%d %H:%M:%S'),
			"loan_amount": 600000,
			"loan_rate": 0.0004,
			"uid": "zeng",
			"interest_mode": "ACAI",
			"pay_flow_num": "15480283560",
			"name": "",
			"loan_term": "60",
			"loan_id": "",
			"loan_time": datetime.now().strftime('%Y-%m-%d %H:%M:%S')
			},
		"repaymentPlans": [{
			"repayment_interest": 1680,
			"overdue_days": 0,
			"period_num": 1,
			"contract_id": "",
			"repayment_late_fee": 0,
			"repayment_penalty": 0,
			"repayment_principal": 100000,
			"repay_flag": 0,
			"repayment_time": '2019-03-26',
			"uid": "zeng",
			"repayment_svc_fee": 0,      #服务费
			"repayment_amount": 35013.33,
			"overdue_flag": 0
			},
			{
				"repayment_interest": 1680,
				"overdue_days": 0,
				"period_num": 1,
				"contract_id": "",
				"repayment_late_fee": 0,
				"repayment_penalty": 0,
				"repayment_principal": 100000,
				"repay_flag": 0,
				"repayment_time": '2019-03-26',
				"uid": "zeng",
				"repayment_svc_fee": 0,  # 服务费
				"repayment_amount": 35013.33,
				"overdue_flag": 0
			},
			{
				"repayment_interest": 1680,
				"overdue_days": 0,
				"period_num": 1,
				"contract_id": "",
				"repayment_late_fee": 0,
				"repayment_penalty": 0,
				"repayment_principal": 100000,
				"repay_flag": 0,
				"repayment_time": '2019-03-26',
				"uid": "zeng",
				"repayment_svc_fee": 0,  # 服务费
				"repayment_amount": 35013.33,
				"overdue_flag": 0
			}
		]
	},
	"repayment":  {
		"contract_no": "P18073015201914",
		"use_for": "1",
		"channel": "银河钱包",
		"loan_amount": 200000,
		"product_name": "钱包app",
		"sign_time": 1532935230000,
		"url": "https://galaxy-origin-1251808348.cos.ap-beijing.myqcloud.com/MSContract/2018-08-05/MSContract1533416414886001.pdf",
		"uid": "28953",
		"single_rate": 0.0300,
		"interest_mode": "ACAI",
		"phone": "18380481918",
		"name": "田军",
		"loan_term": "1",
		"id": "bd17403b0f5d44c6a0797fb4210441cd",
		"loan_id": "2171",
		"status": 6,
		"loan_time": 1532935230000
		},
		"repaymentPlans": [{
		"repayment_interest": 6000,
		"overdue_days": 109,
		"period_num": "1",
		"contract_id": "P18073015201914",
		"repayment_late_fee": 10000,
		"repayment_penalty": 190000,
		"fact_capital_amount": 0,
		"repayment_principal": 200000,
		"repayment_time": 1535613630000,
		"repay_flag": 0,
		"fact_service_fee": 0,
		"uid": "28953",
		"fact_fine_amount": 0,
		"repayment_svc_fee": 0,
		"repayment_amount": 406000,
		"id": "84b76d6916884603b73c7577f1167a43",
		"overdue_flag": 1,
		"fact_repay_amount": 0
		}],
		"paymentHistory": {
		"contract_no": "P18073015201914",
		"late_fee": 0,
		"contract_id": "bd17403b0f5d44c6a0797fb4210441cd",
		"repayment_method": 1,
		"channel": 1,
		"repayment_status": 4,
		"repayment_time": 1535587199000,
		"uid": "28953",
		"pay_flow_num": "PONC3e049bc610714d018aaf4cf32f58c032",
		"phone": "18380481918",
		"name": "田军",
		"ctime": 1535587199000,
		"repayment_amount": 0,
		"id": "f04cb5f79ded43cca8463653f2f5e44b",
		"loan_id": "2171"
	}
}